package com.mzy.basics.abstractDemo;

import java.util.ArrayList;
import java.util.Optional;
import java.util.concurrent.ForkJoinPool;

/**
 * @author Ives
 * * @date 2021/11/19
 */
public class Test02 extends abstractDemo1{
  public static void main(String[] args) {
    Test test = new Test();
    test.eat("用刀子");
    test.food("苹果");


    ArrayList<Integer> list = new ArrayList<>();
    list.add(2);
    list.add(3);
    list.add(4);

    Optional<Integer> max = list.stream().max((x1, x2) -> x1 > x2 ? 1 : -1);
    if (max.isPresent()){
      System.out.println(max.get());
    }





    System.out.println(list);
  }

  @Override
  public void run() {


  }
}
